movePageSliceOutOfPage

abstract fun movePageSliceOutOfPage(pageSlice: DesignBlock, index: Int, options: MovePageSliceOptions = MovePageSliceOptions()): DesignBlock

Moves a page slice and its content to a new page without page slices. The new page joins the parent of the source page. The id of the page slice becomes invalid. The content keeps its ids. The page slices after it close the gap. An enabled fill of the page slice stays. Otherwise the new page takes the fill of the source page when MovePageSliceOptions.convertSourceToPage acts, and a white fill when it does not. When the move takes the last page slice, the source stays as an empty page without page slices. Conversion keeps the supported appearance keyframes. Tracks of a page slice use the playback clock of its page. Conversion refuses preset animations and other tracks, such as geometry and crop tracks. MovePageSliceOptions.convertSourceToPage refuses a remaining page slice with preset animations or keyframes. Note that the call runs an internal update even when implicit updates are disabled. It records no undo step: call EditorApi.addUndoStep after the move, as after any other edit. It fails while the engine switches the active history.

Return

the id of the new page. A failed move changes nothing.

Parameters

pageSlice

a page slice of a page in a scene.

index

the position of the new page among the pages of the scene, before the move, from 0 to the number of pages. The source page counts. Other children of the scene do not count.

options

the MovePageSliceOptions of the move.